# get rid of that stupid cache mechanism
rm -f config.cache

AC_INIT(configure.ac)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_ISC_POSIX
AM_INIT_AUTOMAKE(cpersuit, 0.0.1)
AM_CONFIG_HEADER(config.h)

AC_C_BIGENDIAN
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_CONST
AM_ENABLE_SHARED
AM_PROG_LIBTOOL

create_shared_lib=""
case "$host_os" in
    *bsd*)
       AC_DEFINE(HAVE_BSD, [], "Have a BSD distribution")
    ;;
    linux*)
       AC_DEFINE(HAVE_LINUX, [], "Have a Linux distribution")
    ;;
    mingw|mingw32)
	create_shared_lib="-no-undefined"
    ;;
esac
AC_SUBST(create_shared_lib)

AC_OUTPUT([
Makefile
cpersuit.pc
src/Makefile
src/lib/Makefile
src/bin/Makefile
src/examples/Makefile
],[
])


